package losrebellos.lospistoleros.core.model.events 
{
	import losrebellos.lospistoleros.core.controller.events.IPControllerEventDispatcher;
	import losrebellos.lospistoleros.core.model.PModel;
	import losrebellos.lospistoleros.core.view.events.IPViewEventDispatcher;

	/*
	 *
	 * @author los rebellos - ben@benoitvinay.com
	 *
	 */
	public class PModelEventDispatcher extends PModel implements IPModelEventDispatcher 
	{
		/*
		 * 
		 * VARIABLES
		 * 
		 */
		protected var _view:IPViewEventDispatcher;
		protected var _controller:IPControllerEventDispatcher;

		
		/*
		 *
		 * CONSTRUCTOR
		 *
		 */
		public function PModelEventDispatcher(name:String = null, type:String = null)
		{
			super(name, type);
		}

		
		/*
		 * 
		 * MVC
		 * 
		 */
		public function setView(v:IPViewEventDispatcher):void
		{
			_view = v;
		}
		public function setController(c:IPControllerEventDispatcher):void
		{
			_controller = c;
		}
		public function getView():IPViewEventDispatcher
		{
			return _view;
		}
		public function getController():IPControllerEventDispatcher
		{
			return _controller;
		}
	}
}